# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        Young  
# Name:         demo4.15
# Description:
# Author:       $赵怡蕾
# Date:         2019/1/28
#-------------------------------------------------------------------------------

numbers = [1,2,3,4,5,6,7,8,9]
print(numbers[:7:2])               # 省略开始索引并指定步长为2，运行结果：[1, 3, 5, 7]
print(numbers[::2])                # 省略开始索引和结束索引并指定步长为2，运行结果：[1, 3, 5, 7, 9]
print(numbers[3::2])               # 省略结束索引并制定步长为2，运行结果：[4, 6, 8]
